/**
 * 作者: ${author}
 * 描述: ${cfg.describe}
 * 更新时间: ${date}
 * 版本: 1.0.0
 */
export class ${cfg.name}Req {
<#list table.fields as field>
  /**
   * ${field.comment}
   */
  public ${field.propertyName}: any;
</#list>

  constructor(data: any = {}) {
<#list table.fields as field>
    this.${field.propertyName} = data.${field.propertyName};
</#list>
  }
}

/**
 * 作者: ${author}
 * 描述: ${cfg.describe}，返回参数对象
 */
export class ${cfg.name}Res {
<#list table.fields as field>
  /**
   * ${field.comment}
   */
  public ${field.propertyName}: any;
</#list>

  constructor(data: any = {}) {
<#list table.fields as field>
    this.${field.propertyName} = data.${field.propertyName};
</#list>
  }
}

/**
 * 查询公共条件
 */
export class Query {
  /**
   * 排序字段
   */
  public sortFields: Array<string>;

  /**
   * asc从小到大排列，即升序
   * desc从大到小排序，即降序
   * 排序规则
   */
  public rule: string;

  /**
   * 模糊查询字段
   */
  public likeFields: Array<string>;

  constructor(data: any = {}) {
    this.sortFields = data.sortFields;
    this.rule = data.rule;
    this.likeFields = data.likeFields;
  }
}

